<div class="page-container">
  <!-- 左侧菜单 -->
  <div class="sidebar">
    <ul>
      <li @click="selectMenu('medicalNotice')">门诊就诊须知(首页)</li>
      <li @click="selectMenu('hospitalGuidelines')">院内指南</li>
      <li @click="selectMenu('appointmentRules')">预约规则</li>
      <li @click="selectMenu('officialAccountAddress')">门诊就诊须知(顶部)</li>
      <li @click="selectMenu('specialtyListName')">科室信息</li>
      <li @click="selectMenu('medicalExpertise')">医疗专长</li>
    </ul>
  </div>

  <!-- 右侧内容 -->
  <div class="content">


    <div v-if="selectedMenu === 'medicalNotice'" class="form-container">
      <p>中文</p>
      <textarea class="small-textarea" v-model="newData[4].TITLE"></textarea>
      <textarea v-model="newData[4].TSNR"></textarea>
      <p>英文</p>
      <textarea class="small-textarea" v-model="newData[4].TITLE_EN"></textarea>
      <textarea v-model="newData[4].TSNR_EN"></textarea>
      <div class="button1-container">
        <button class="query-btn" @click="get_official_account_data">查询</button>
        <button class="save-btn" @click="update_official_account_data">更新</button>
      </div>
    </div>

    <div v-if="selectedMenu === 'hospitalGuidelines'" class="form-container">
      <p>中文</p>
      <textarea class="small-textarea" v-model="newData[1].TITLE"></textarea>
      <textarea v-model="newData[1].TSNR"></textarea>
      <p>英文</p>
      <textarea class="small-textarea" v-model="newData[1].TITLE_EN"></textarea>
      <textarea v-model="newData[1].TSNR_EN"></textarea>
      <div class="button2-container">
        <button class="query-btn" @click="get_official_account_data">查询</button>
        <button class="save-btn" @click="update_official_account_data">更新</button>
      </div>
    </div>

    <div v-if="selectedMenu === 'appointmentRules'" class="form-container">
      <p>中文</p>
      <textarea class="small-textarea" v-model="newData[2].TITLE"></textarea>
      <textarea v-model="newData[2].TSNR"></textarea>
      <p>英文</p>
      <textarea class="small-textarea" v-model="newData[2].TITLE_EN"></textarea>
      <textarea v-model="newData[2].TSNR_EN"></textarea>
      <div class="button3-container">
        <button class="query-btn" @click="get_official_account_data">查询</button>
        <button class="save-btn" @click="update_official_account_data">更新</button>
      </div>
    </div>

    <div v-if="selectedMenu === 'officialAccountAddress'" class="form-container">
      <p>中文</p>
      <textarea class="small-textarea" v-model="newData[0].TITLE"></textarea>
      <textarea v-model="newData[0].TSNR"></textarea>
      <p>英文</p>
      <textarea class="small-textarea" v-model="newData[0].TITLE_EN"></textarea>
      <textarea v-model="newData[0].TSNR_EN"></textarea>
      <div class="button4-container">
        <button class="query-btn" @click="get_official_account_data">查询</button>
        <button class="save-btn" @click="update_official_account_data">更新</button>
      </div>
    </div>

    <div v-if="selectedMenu === 'specialtyListName'" class="form-container">
      <div v-for="(item, index) in ksData" :key="index" class="mn-container"></div>
        <p>专科名称</p>
        <p>中文</p>
        <textarea v-model="item.MC"></textarea>
        <p>英文</p>
        <textarea v-model="item.MC_EN"></textarea>
        <p>专科介绍</p>
        <p>中文</p>
        <textarea v-model="item.ZKJS"></textarea>
        <p>英文</p>
        <textarea v-model="item.ZKJS_EN"></textarea>

        <div class="button-container">
          <button class="query-btn" @click="get_ks_info">查询</button>
          <button class="save-btn" @click="() => update_ks_info(item)">更新</button>
        </div>
      </div>
    </div>

    <div v-if="selectedMenu === 'medicalExpertise'" class="form-container">
      <div v-for="(item, index) in ysData" :key="index" class="mn-container">
        <p>中文</p>
        <textarea v-model="item.ZH_VALUE"></textarea>
        <p>英文</p>
        <textarea v-model="item.VALUE"></textarea>

        <div class="button-container">
          <button class="query-btn" @click="get_ys_info">查询</button>
          <button class="save-btn" @click="() => update_ys_info(item)">更新</button>
        </div>
      </div>
    </div>

  </div>
</div>